1. Field of the Invention
The present invention is related to a method of extracting the contour of a subject image from an original, and more particularly to an improvement for generating contour image data expressing the contour.
2. Description of Background Art
In a photographic process for printing, a cut-out mask is often prepared in order to cutout a desired image area from an original image plane. When a photograph of goods is prepared as an original image for printing a catalog of the goods, for example, the image of the goods is separated form the background image through a cut-out mask adapted to the shape of goods. The image area extracted through the cut-out mask is then combined with other images according to a desired layout, and is reproduced on a photosensitive film with a graphic arts scanner. The cut-out mask may be also used to extract a desired image area for tone correction.
In electronic image processing, such a cut-out mask is produced in the form of a binary mask pattern, in which the inner region of a desired image area is indicated by a logical high ("1") level while the outer region is indicated by a logical low ("0") level. The boundary between the inner and outer regions is the contour of the desired image area. An image masking or image cutting-out operation is attained by determining for each pixel whether the original image data is valid or invalid with reference to the binary mask pattern, where "valid" and "invalid" are indicated by the "1" and "0" levels, respectively.
One of the most practical techniques for producing a binary mask pattern employs a small window being set on a small area including a part of the contour. The respective density levels of pixels surrounded by the small window are compared with a threshold level, and the "1" level is given to pixels whose density levels are higher than the threshold level while the "0" level is given to pixels whose density levels are lower than the threshold level. Therefore, when the threshold level is so selected as to be an intermediate level between respective optical densities of an desired image and a background image thereof, the inner region and the outer region of the desired image can be distinguished from each other on a bit plane as a "1" level region and a "0" level region, respectively.
The small window is then moved to the next small area along the contour, while observing the original image and the small window on a CRT, and the above-indicated operation is repeated for the next small area. When the repetition is completed for the whole image boundary, the contour image appears on the bit plane as a closed boundary between the "1" level region and the "0" level region. The binary mask pattern can be obtained by filling the region surrounded by the contour on the bit plane with the "1" level.
Although the conventional technique can be applied to many types of image contours, it has a disadvantage that the threshold level should be frequently updated as the small window is moved along the contour because the density level of the original image may change considerably along the contour. Since the selection of the threshold value is delicate work, a relatively long time is required for frequently updating the threshold value, even for a skilled operator.
Furthermore, when the original image is a color image expressed by a set of color-component images, a problem results respecting what color-component image is employed for detection of the contour. In particular, if the respective parts of the contour exist on different color components, the whole of the contour cannot be systematically detected, since the conventional technique employs one or more color-component images which are selected through an intuition of an operator.
Another disadvantage of the conventional technique is that rifts and pin holes in the contour image are hardly eliminated or compensated through the contour detection process.